package cn.java75.aop2.serivce;

import cn.java75.aop.entity.Student;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
@Service
public class StudentService implements StudentServiceI {
    @Override
    public int add(Student stu) {
        System.out.println(stu+"加到了数据库");
        return (int) (System.currentTimeMillis()%2);
    }

    @Override
    public int del(Student stu) {
        System.out.println(stu.getSname()+"被删除了");
        return 0;
    }

    @Override
    public List<Student> searh(String name) {

        System.out.println("模拟查询");
        return null;
    }
}
